package com.yanmaohu.yulia.bean;

/**
 * @author Bright Lee
 */
public final class ViewColumnOption implements ViewElement {

    private int beginIndex;
    private int endIndex;
    private Identifier columnName;
    private ScopeClause scopeClause;

    public ViewColumnOption(Identifier columnName,
                            ScopeClause scopeClause) {
        this.beginIndex = columnName.getBeginIndex();
        this.endIndex = scopeClause.getEndIndex();
        this.columnName = columnName;
        this.scopeClause = scopeClause;
    }

    @Override
    public int getBeginIndex() {
        return beginIndex;
    }

    @Override
    public int getEndIndex() {
        return endIndex;
    }

    public Identifier getColumnName() {
        return columnName;
    }

    public ScopeClause getScopeClause() {
        return scopeClause;
    }

}
